var ordersH={
    list:function (pageIndex) {
        var key="";
        $("#mlist tbody").html("");
        ajaxH.get(urlH.orders.list(key,pageIndex),function (data) {
            var html='';
            if(data.flag=="success"){
                if(data.data.length>0){
                    for(i=0;i<data.data.length;i++){
                        var m=data.data[i];
                        var tr= $('<tr onMouseOver="onTR(this,1)" onMouseOut="onTR(this,0)" class="tr0" bgcolor="#FFFFFF" onClick="clickTR(this)" onDblClick="dbClickTR(this)"><td class="td0"></td><td class="tdl"></td><td class="tdm"></td><td class="tdm"></td><td class="tdm"></td><td class="tdm"></td><td class="tdl"></td><td class="tdm"></td><td class="tdl"></td><td class="tdm"></td></tr>');
                        tr.children().eq(0).html($('<input id="'+m.id+'" type="checkbox" name="productid" />'));

                        var country='';
                        switch(m.CountryCode){
                            case "GB":{
                                country='英国';
                                break;
                            }
                        }

                        tr.children().eq(1).text("订单号:"+m.AmazonOrderId);
                        tr.children().eq(2).html("销售订单:"+m.AmazonOrderId+"<br>"+country);
                        tr.children().eq(3).text(m.Amount);
                        tr.children().eq(4).text(0);
                        tr.children().eq(5).text(0);
                        tr.children().eq(6).text(m.OrderStatus);
                        tr.children().eq(7).text(m.MarketplaceId);
                        tr.children().eq(8).text(m.MarketplaceId);
                        tr.children().eq(9).text(m.PurchaseDate);


                        $("#mlist tbody:eq(0)").append(tr);
                    }
                    // $("#mlist tbody").html(html);
                }else{
                    $("#mlist tbody:eq(1)").append($('<tr bgcolor="#FFFFFF"><td colspan="11" id="empty">没有相关记录</td></tr>'));
                }
                intiPage(data.pageTotal,pageIndex,ordersH.list);
            }else{
                alert("数据获取异常");
            }
        },"json");
    },
    detail:function (id) {

    },
    delete:function (id) {

    }
}